//
//  Empty.swift
//  Teacher
//
//  Created by zhuxuhong on 2017/11/9.
//  Copyright © 2017年 北大方正电子. All rights reserved.
//

import UIKit
import EmptyKit

protocol BaseEmptyDataSource: EmptyDataSource {
}
protocol BaseEmptyDelegate: EmptyDelegate {
}

extension BaseEmptyDataSource{
	func backgroundColorForEmpty(in view: UIView) -> UIColor {
		return .groupTableViewBackground
	}
	
	func imageForEmpty(in view: UIView) -> UIImage? {
		return UIImage.named("img_no_data")
	}
	
	func titleForEmpty(in view: UIView) -> NSAttributedString? {
		return NSAttributedString(string: "没有任何数据哦\n", attributes: [NSForegroundColorAttributeName: UIColor.lightGray, NSFontAttributeName: Font.p14.system])
	}
	
	func buttonTitleForEmpty(forState state: UIControlState, in view: UIView) -> NSAttributedString? {
		return NSAttributedString(string: "刷新重试", attributes: [NSForegroundColorAttributeName: UIColor.appGreen, NSFontAttributeName: Font.p14.system])
	}
}
